{% extends 'demo/base.html' %}
{% block title %}
    {{ now_cls }}博客--专业IT技术发表平台
{% endblock %}
{% block header %}
    {% include 'demo/header.html' %}
{% endblock %}
{% block main %}
{#    引用分类部分#}
    {% include 'demo/classes.html' %}
{#    重写文章内容部分#}
    <ul class="nav">
        {% if not articles %}
            <div class="bottom_info"> 该分类暂无文章</div>
        {% endif %}
        {% for article in articles %}
            {% if forloop.first %}
                <div class="top_info"> 这是第一遍文章~~</div>
            {% endif %}
            <li>
                <a href="/demo/article/{{ article.id }}/">
                    <div class="left">
                        <h4>{{ forloop.counter }}、{{ article.title }}</h4>
                        <p>
                            {{ article.desc }}
                        </p>
                        <p class="time-info">发布时间：{{ article.create_time|date:"Y-m-d H:i:s" }}</p>
                    </div>
                    <div class="right">
                        <img src="{{ article.cover }}" alt="">
                    </div>
                </a>
            </li>
            {% if forloop.last %}
                <div class="bottom_info"> 已经是最后一遍文章了~~</div>
            {% endif %}
        {% endfor %}
    </ul>
{% endblock %}